﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Warensoft.Socket.MessageDataStructs
{
    /// <summary>
    /// 每一个消息包的接口
    /// </summary>
    public interface IPackage:IDisposable
    {
        /// <summary>
        /// 正文数据
        /// </summary>
        byte[] ContentBuffer { get; set; }
        /// <summary>
        /// 该消息的名称
        /// </summary>
        string  Name { get; set; }
        /// <summary>
        /// 该消息的长度
        /// </summary>
        short MessageLength { get; set; }
       
        /// <summary>
        /// 连接两个数据包的内容
        /// </summary>
        /// <param name="anotherPackage">另外一个包</param>
        /// <returns>合并后的包</returns>
        Message Concat(PackageBase  anotherPackage);
        
    }
    
}
